import Movies from "../pages/movies/index.js";
import Add from "../pages/movies/add.js";
import Update from "../pages/movies/update.js";
import uploadImgs from "../pages/movies/uploadImgs.js"
import uploadPoster from "../pages/movies/uploadPoster.js"
import Change from "../pages/movies/update.js"
// import movies from "../api/movies.js";
export default {
    "/movies": {
      // 首先执行`
        on(){
          new Movies({el:".layui-body"})
        }
      },
      "/add-movie": {
        //第二步执行
        on(){
          new Add({el:".layui-body"})
        }
      },
      "/api/update": {
        //第二步执行
        on(){
          new Update({el:".layui-body"})
        }
      },
      "/upload-imgs/:_id": {
        //第二步执行
        on(_id){
          new uploadImgs({el:".layui-body",_id})
        }
      },

      "/upload-poster/:_id": {
        //第二步执行
        on(_id){
          new uploadPoster({el:".layui-body",_id})
        }
      },
      "/change-movies/:_id": {
        on(_id) {
            new Change({ el: ".layui-body" ,_id});
        }
    },
      
}
